** Replication Code for:
** Terrorism Activates Ethnocentrism to Explain Greater Willingness to 
** Sacrifice Civil Liberties: Evidence from Germany
** Authors: Christina Novak Hansen and Peter Thisted Dinesen 
** Date: 10/02/2021

*-------------------------------------------------------------------------------

clear all
use GGSS2016_analysis.dta
svyset xs11 [pweight=wghtpew], vce(linearized)
keep if german==1 & governmentsplit!=.					

*-------------------------------------------------------------------------------
*Appendix M: Robustness check: Modelling ethnocentrism categorically
*-------------------------------------------------------------------------------

								***Table M1***


*Full ethnocentrism index and civil liberties with reference to terrorism
*Upper 2/3 (66.81%) versus lower 1/3 of the observations (33.19%)
svy: regress st_terrori c.ethno_upper2_3dummy i.sex st_age st_age2 i.proedu2 i.work2 if treatment1!=. 
outreg2 using Table_M1.xls, drop(i.sex st_age st_age2 i.proedu2 i.work2) nocons stats(coef se) dec(2) symbol(**,*) alpha(0.01,0.05) label replace 
svy: regress st_terrori c.ethno_upper2_3dummy i.treatment1 i.sex st_age st_age2 i.proedu2 i.work2 
outreg2 using Table_M1.xls, drop(i.sex st_age st_age2 i.proedu2 i.work2) nocons stats(coef se) dec(2) symbol(**,*) alpha(0.01,0.05) label append 
svy: regress st_terrori c.ethno_upper2_3dummy##i.treatment1 i.sex st_age st_age2 i.proedu2 i.work2  
outreg2 using Table_M1.xls, drop(i.sex st_age st_age2 i.proedu2 i.work2) nocons stats(coef se) dec(2) symbol(**,*) alpha(0.01,0.05) label append

*Upper 1/3 (33.52%) versus lower 2/3 of the observations (66.48%)
tab ethno ethno_upper1_3dummy if treatment1!=.
svy: regress st_terrori c.ethno_upper1_3dummy i.sex st_age st_age2 i.proedu2 i.work2 if treatment1!=. 
outreg2 using Table_M1.xls, drop(i.sex st_age st_age2 i.proedu2 i.work2) nocons stats(coef se) dec(2) symbol(**,*) alpha(0.01,0.05) label append 
svy: regress st_terrori c.ethno_upper1_3dummy i.treatment1 i.sex st_age st_age2 i.proedu2 i.work2 
outreg2 using Table_M1.xls, drop(i.sex st_age st_age2 i.proedu2 i.work2) nocons stats(coef se) dec(2) symbol(**,*) alpha(0.01,0.05) label append 
svy: regress st_terrori c.ethno_upper1_3dummy##i.treatment1 i.sex st_age st_age2 i.proedu2 i.work2 
outreg2 using Table_M1.xls, drop(i.sex st_age st_age2 i.proedu2 i.work2) nocons stats(coef se) dec(2) symbol(**,*) alpha(0.01,0.05) label append








